package com.creditease.cn.monitor.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import redis.clients.jedis.Jedis;

import com.creditease.cn.monitor.dao.redis.SlaveRedisNode;
import com.creditease.cn.monitor.service.HashService;

@Service
public class HashServiceImpl implements HashService{
	private Logger logger = LoggerFactory.getLogger(ListServiceImpl.class);
	@Autowired
	private SlaveRedisNode slaveRedisNode;

	public Map<String, String> getValue(String key) {
		Map<String,String> result = new HashMap<String, String>();
		Jedis jedis = slaveRedisNode.getConnection();
		result = jedis.hgetAll(key);
		return result;
	}
	
	
}
